package system.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SyuserSyrole entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "syuser_syrole", catalog = "sypro")
public class SyuserSyrole implements java.io.Serializable {

	// Fields

	private String id;
	private Syrole syrole;
	private Syuser syuser;

	// Constructors

	/** default constructor */
	public SyuserSyrole() {
	}

	/** full constructor */
	public SyuserSyrole(String id, Syrole syrole, Syuser syuser) {
		this.id = id;
		this.syrole = syrole;
		this.syuser = syuser;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false, length = 36)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SYROLE_ID", nullable = false)
	public Syrole getSyrole() {
		return this.syrole;
	}

	public void setSyrole(Syrole syrole) {
		this.syrole = syrole;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SYUSER_ID", nullable = false)
	public Syuser getSyuser() {
		return this.syuser;
	}

	public void setSyuser(Syuser syuser) {
		this.syuser = syuser;
	}

}